package com.itheima.stream流.实例;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;

public class Demo1 {
    public static void main(String[] args) {
        ArrayList<String> list=new ArrayList<>();
        Collections.addAll(list,"张三丰","张无忌","张翠山","张三","王二麻子");
        list.stream().filter(s->s.startsWith("张")).filter(s->s.length()==3).forEach(System.out::println);
    }
}
